/*
 * Created by: vadikv
 * Created: Sunday, March 16, 2008
 */

using OneDayModel.Services;
using OneDayModel.Tests.Fits.Fixtures.Definitions;
using TestUtils;

namespace OneDayModel.Tests.Mocks
{
    public class MockIdGenerator : IIdGenerator
    {
        private int baseConfirmationId;

        public string NewConfirmationId()
        {
            return (++baseConfirmationId).ToString();
        }


        public MockIdGenerator()
        {
            DefinitionExplorer<ConfirmationServiceDefinitionFixture> confirmationDefinitions =
                new DefinitionExplorer<ConfirmationServiceDefinitionFixture>();
            if (confirmationDefinitions.Count > 0)
                baseConfirmationId = int.Parse(confirmationDefinitions[0].BaseConfirmationId);
            else
                baseConfirmationId = -100000;
        }
    }
}